package com.fc.advbox.utils.tree;

import java.util.Comparator;

/**
 * Created by charles on 2018/6/11.
 */
public class NodeIDComparator implements Comparator {
    // 按照节点编号比较
    public int compare(Object o1, Object o2) {
        int j1 = ((Node) o1).getId();
        int j2 = ((Node) o2).getId();
        return (j1 < j2 ? -1 : (j1 == j2 ? 0 : 1));
    }
}
